package cn.yunhe.struts.controller;

import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.ServletActionContext;
import com.alibaba.fastjson.JSON;
import cn.yunhe.struts.model.UserModel;

public class UserController3{
	

	public void queryUser() throws IOException{
		
		HttpServletResponse resp = ServletActionContext.getResponse();
		resp.setContentType("text/html");
		PrintWriter out  = resp.getWriter();
		 
		UserModel user = new UserModel();
		user.setUsername("赵子龙");
		user.setUserphone("13803831229");
		
		out.print(JSON.toJSONString(user));
		
		out.flush();
		out.close();
	}



}
